package Lab1;

public class Student {

    private String firstName, lastName, email;
    private int group;

    public Student(String fn, String ln, String e, int n) {
        firstName = fn;
        lastName = ln;
        email = e;
        group = n;
    }
    
    @Override
    public String toString(){
        return "Name: "+firstName+" "+lastName+", email: "+email+", group "+group;
    }
    
    public int getGroup(){
        return group;
    }
    
    public boolean less(Student b){
        return group<b.getGroup();
    }
    
    public static void main(String[] agrs) {
        Student a=new Student("Haha", "Wa", "abc@com",3);
        System.out.println(a);
        
        Student b=new Student("Yali", "Da", "abc@com",2);
        System.out.println(b);
        System.out.println(a.less(b));
        System.out.println(b.less(a));
    }
}
